<?xml version="1.0" encoding="UTF-8"?>

<!--suppress ALL -->
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane fx:id="dialogRootPane"
            fx:controller="ru.lukyanets.transmission.client.ui.controller.ConnectionsDialogController"
            stylesheets="@../css/connectionsDialog.css"
            xmlns:fx="http://javafx.com/fxml"
            xmlns="http://javafx.com/javafx">
    <top>
        <GridPane fx:id="selectorGridPane">
            <columnConstraints>
                <ColumnConstraints hgrow="NEVER" percentWidth="30"/>
                <ColumnConstraints hgrow="NEVER" percentWidth="70"/>
            </columnConstraints>
            <rowConstraints>
                <RowConstraints prefHeight="30" vgrow="NEVER"/>
                <RowConstraints prefHeight="30" vgrow="NEVER"/>
            </rowConstraints>
            <Label text="Connection:" GridPane.columnIndex="0" GridPane.rowIndex="0"/>
            <ChoiceBox maxWidth="Infinity" fx:id="connectionSelector" GridPane.columnIndex="1" GridPane.rowIndex="0" />
            <TextField visible="false" maxWidth="Infinity" fx:id="editName" GridPane.columnIndex="1" GridPane.rowIndex="0" />
            <HBox fx:id="selectorButtons" GridPane.columnSpan="2" GridPane.columnIndex="0" GridPane.rowIndex="1">
                <Button fx:id="buttonCreate" text="%dialog.connections.button.create" />
                <Button fx:id="buttonRename" text="%dialog.connections.button.rename" />
                <Button fx:id="buttonDelete" text="%dialog.connections.button.delete" />
            </HBox>
            <HBox visible="false" fx:id="editButtons" GridPane.columnSpan="2" GridPane.columnIndex="0" GridPane.rowIndex="1">
                <Button fx:id="editOkButton" text="%dialog.yes.button" />
                <Button fx:id="editCancelButton" text="%dialog.cancel.button" />
            </HBox>
        </GridPane>
    </top>
    <center>
        <TabPane fx:id="connectionPane" tabClosingPolicy="UNAVAILABLE" BorderPane.alignment="CENTER">
            <Tab fx:id="connectionTab" text="Connection">
                <AnchorPane>
                    <GridPane styleClass="tab-pane-grid">
                        <columnConstraints>
                            <ColumnConstraints hgrow="NEVER" percentWidth="35"/>
                            <ColumnConstraints hgrow="NEVER" percentWidth="65"/>
                        </columnConstraints>
                        <rowConstraints>
                            <RowConstraints prefHeight="30" vgrow="NEVER"/>
                            <RowConstraints prefHeight="30" vgrow="NEVER"/>
                            <RowConstraints prefHeight="30" vgrow="NEVER"/>
                            <RowConstraints prefHeight="30" vgrow="NEVER"/>
                        </rowConstraints>
                        <Label text="Remote host:"/>
                        <TextField fx:id="host" GridPane.columnIndex="1" />
                        <Label text="Port:" GridPane.rowIndex="1"/>
                        <HBox styleClass="portContainer" GridPane.columnIndex="1" GridPane.rowIndex="1">
                            <Spinner fx:id="port" min="1000" max="65535" initialValue="9091" editable="true" />
                            <CheckBox fx:id="useSSL" text="Use SSL" />
                        </HBox>
                        <Label text="Username:" GridPane.rowIndex="2"/>
                        <TextField fx:id="username" GridPane.columnIndex="1" GridPane.rowIndex="2" />
                        <Label text="Password:" GridPane.rowIndex="3"/>
                        <PasswordField fx:id="password" GridPane.columnIndex="1" GridPane.rowIndex="3" />
                        <Label text="RPC Path:" GridPane.rowIndex="4"/>
                        <TextField fx:id="alternativePath" GridPane.columnIndex="1" GridPane.rowIndex="4"  />
                    </GridPane>
                </AnchorPane>
            </Tab>
            <Tab fx:id="proxyTab" text="Proxy">
                <AnchorPane>
                    <GridPane styleClass="tab-pane-grid">
                        <columnConstraints>
                            <ColumnConstraints hgrow="NEVER" percentWidth="35"/>
                            <ColumnConstraints hgrow="NEVER" percentWidth="65"/>
                        </columnConstraints>
                        <rowConstraints>
                            <RowConstraints prefHeight="30" vgrow="NEVER"/>
                            <RowConstraints prefHeight="30" vgrow="NEVER"/>
                            <RowConstraints prefHeight="30" vgrow="NEVER"/>
                            <RowConstraints prefHeight="30" vgrow="NEVER"/>
                            <RowConstraints prefHeight="30" vgrow="NEVER"/>
                        </rowConstraints>
                        <CheckBox fx:id="useProxy" text="Use proxy server" />
                        <Label text="Proxy server:" GridPane.rowIndex="1"/>
                        <TextField fx:id="proxyHost" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
                        <Label text="Proxy port:" GridPane.rowIndex="2"/>
                        <HBox styleClass="portContainer" GridPane.columnIndex="1" GridPane.rowIndex="2">
                            <Spinner fx:id="proxyPort" min="1000" max="65535" initialValue="8080" editable="true" />
                        </HBox>
                        <Label text="Proxy username:" GridPane.rowIndex="3"/>
                        <TextField fx:id="proxyUsername" GridPane.columnIndex="1" GridPane.rowIndex="3" GridPane.valignment="CENTER"/>
                        <Label text="Proxy password:" GridPane.rowIndex="4"/>
                        <PasswordField fx:id="proxyPassword" GridPane.columnIndex="1" GridPane.rowIndex="4" GridPane.valignment="CENTER"/>
                    </GridPane>
                </AnchorPane>
            </Tab>
            <Tab text="Paths">
                <AnchorPane />
            </Tab>
            <Tab text="Misc">
                <AnchorPane />
            </Tab>
        </TabPane>
    </center>
</BorderPane>
